<template>
    <div v-if="show" style="text-align: left">
        <custom-dialog title="编辑表" size="small" @dialogClose="dialogTableClose">
            <form-index :formConfig="formTableConfig" @submit="tableSubmit" :type="tableType" @formInputChange="formInputChange" ref="form">
            </form-index>
        </custom-dialog>
    </div>
</template>

<script>
import customDialog from '@/components/customComponents/customDialog'
import formIndex from '@/components/customComponents/customForm/formIndex'
import {editTableForm} from '@/assets/form/controlCenter/editTable'
export default {
    name: 'editTable',
    props: {
        item: {
            type: Array,
            required: false
        },
        show: {
            type: Boolean,
            required: true
        }
    },
    components: {customDialog, formIndex},
    data() {
        return {
            tableType: 'add',
            formTableConfig: editTableForm
        }
    },
    computed: {},
    created() {},
    methods: {
        formInputChange(e) {
            console.log(e)
        },
        dialogTableClose() {
            this.$emit('close', '')
        },
        tableSubmit(d) {
            console.log(d)
        }
    }
}
</script>

<style lang="scss" scoped>
.editTable {
}
</style>
